//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.entity.auth;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itheima.pinda.authority.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Length;

@TableName("pd_auth_menu")
@ApiModel(
        value = "Menu",
        description = "菜单"
)
public class Menu extends Entity<Long> {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("菜单名称")
    @NotEmpty(
            message = "菜单名称不能为空"
    )
    @Length(
            max = 20,
            message = "菜单名称长度不能超过20"
    )
    @TableField(
            value = "name",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String name;
    @ApiModelProperty("功能描述")
    @Length(
            max = 200,
            message = "功能描述长度不能超过200"
    )
    @TableField(
            value = "describe_",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String describe;
    @ApiModelProperty("是否公开菜单")
    @TableField("is_public")
    private Boolean isPublic;
    @ApiModelProperty("对应路由path")
    @Length(
            max = 255,
            message = "对应路由path长度不能超过255"
    )
    @TableField(
            value = "path",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String path;
    @ApiModelProperty("对应路由组件component")
    @Length(
            max = 255,
            message = "对应路由组件component长度不能超过255"
    )
    @TableField(
            value = "component",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String component;
    @ApiModelProperty("是否启用")
    @TableField("is_enable")
    private Boolean isEnable;
    @ApiModelProperty("排序")
    @TableField("sort_value")
    private Integer sortValue;
    @ApiModelProperty("菜单图标")
    @Length(
            max = 255,
            message = "菜单图标长度不能超过255"
    )
    @TableField(
            value = "icon",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String icon;
    @ApiModelProperty("菜单分组")
    @Length(
            max = 20,
            message = "菜单分组长度不能超过20"
    )
    @TableField(
            value = "group_",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String group;
    @ApiModelProperty("父级菜单id")
    @TableField("parent_id")
    private Long parentId;

    public Menu(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime, String name, String describe, Boolean isPublic, String path, String component, Boolean isEnable, Integer sortValue, String icon, String group, Long parentId) {
        this.id = id;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.name = name;
        this.describe = describe;
        this.isPublic = isPublic;
        this.path = path;
        this.component = component;
        this.isEnable = isEnable;
        this.sortValue = sortValue;
        this.icon = icon;
        this.group = group;
        this.parentId = parentId;
    }

    public static Menu.MenuBuilder builder() {
        return new Menu.MenuBuilder();
    }

    public String getName() {
        return this.name;
    }

    public String getDescribe() {
        return this.describe;
    }

    public Boolean getIsPublic() {
        return this.isPublic;
    }

    public String getPath() {
        return this.path;
    }

    public String getComponent() {
        return this.component;
    }

    public Boolean getIsEnable() {
        return this.isEnable;
    }

    public Integer getSortValue() {
        return this.sortValue;
    }

    public String getIcon() {
        return this.icon;
    }

    public String getGroup() {
        return this.group;
    }

    public Long getParentId() {
        return this.parentId;
    }

    public Menu setName(final String name) {
        this.name = name;
        return this;
    }

    public Menu setDescribe(final String describe) {
        this.describe = describe;
        return this;
    }

    public Menu setIsPublic(final Boolean isPublic) {
        this.isPublic = isPublic;
        return this;
    }

    public Menu setPath(final String path) {
        this.path = path;
        return this;
    }

    public Menu setComponent(final String component) {
        this.component = component;
        return this;
    }

    public Menu setIsEnable(final Boolean isEnable) {
        this.isEnable = isEnable;
        return this;
    }

    public Menu setSortValue(final Integer sortValue) {
        this.sortValue = sortValue;
        return this;
    }

    public Menu setIcon(final String icon) {
        this.icon = icon;
        return this;
    }

    public Menu setGroup(final String group) {
        this.group = group;
        return this;
    }

    public Menu setParentId(final Long parentId) {
        this.parentId = parentId;
        return this;
    }

    public Menu() {
    }

    public Menu(final String name, final String describe, final Boolean isPublic, final String path, final String component, final Boolean isEnable, final Integer sortValue, final String icon, final String group, final Long parentId) {
        this.name = name;
        this.describe = describe;
        this.isPublic = isPublic;
        this.path = path;
        this.component = component;
        this.isEnable = isEnable;
        this.sortValue = sortValue;
        this.icon = icon;
        this.group = group;
        this.parentId = parentId;
    }

    public String toString() {
        return "Menu(super=" + super.toString() + ", name=" + this.getName() + ", describe=" + this.getDescribe() + ", isPublic=" + this.getIsPublic() + ", path=" + this.getPath() + ", component=" + this.getComponent() + ", isEnable=" + this.getIsEnable() + ", sortValue=" + this.getSortValue() + ", icon=" + this.getIcon() + ", group=" + this.getGroup() + ", parentId=" + this.getParentId() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Menu)) {
            return false;
        } else {
            Menu other = (Menu)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$describe = this.getDescribe();
                Object other$describe = other.getDescribe();
                if (this$describe == null) {
                    if (other$describe != null) {
                        return false;
                    }
                } else if (!this$describe.equals(other$describe)) {
                    return false;
                }

                label119: {
                    Object this$isPublic = this.getIsPublic();
                    Object other$isPublic = other.getIsPublic();
                    if (this$isPublic == null) {
                        if (other$isPublic == null) {
                            break label119;
                        }
                    } else if (this$isPublic.equals(other$isPublic)) {
                        break label119;
                    }

                    return false;
                }

                label112: {
                    Object this$path = this.getPath();
                    Object other$path = other.getPath();
                    if (this$path == null) {
                        if (other$path == null) {
                            break label112;
                        }
                    } else if (this$path.equals(other$path)) {
                        break label112;
                    }

                    return false;
                }

                Object this$component = this.getComponent();
                Object other$component = other.getComponent();
                if (this$component == null) {
                    if (other$component != null) {
                        return false;
                    }
                } else if (!this$component.equals(other$component)) {
                    return false;
                }

                Object this$isEnable = this.getIsEnable();
                Object other$isEnable = other.getIsEnable();
                if (this$isEnable == null) {
                    if (other$isEnable != null) {
                        return false;
                    }
                } else if (!this$isEnable.equals(other$isEnable)) {
                    return false;
                }

                label91: {
                    Object this$sortValue = this.getSortValue();
                    Object other$sortValue = other.getSortValue();
                    if (this$sortValue == null) {
                        if (other$sortValue == null) {
                            break label91;
                        }
                    } else if (this$sortValue.equals(other$sortValue)) {
                        break label91;
                    }

                    return false;
                }

                Object this$icon = this.getIcon();
                Object other$icon = other.getIcon();
                if (this$icon == null) {
                    if (other$icon != null) {
                        return false;
                    }
                } else if (!this$icon.equals(other$icon)) {
                    return false;
                }

                Object this$group = this.getGroup();
                Object other$group = other.getGroup();
                if (this$group == null) {
                    if (other$group != null) {
                        return false;
                    }
                } else if (!this$group.equals(other$group)) {
                    return false;
                }

                Object this$parentId = this.getParentId();
                Object other$parentId = other.getParentId();
                if (this$parentId == null) {
                    if (other$parentId != null) {
                        return false;
                    }
                } else if (!this$parentId.equals(other$parentId)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Menu;
    }

    public int hashCode() {
        Boolean PRIME = true;
        int result = super.hashCode();
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $describe = this.getDescribe();
        result = result * 59 + ($describe == null ? 43 : $describe.hashCode());
        Object $isPublic = this.getIsPublic();
        result = result * 59 + ($isPublic == null ? 43 : $isPublic.hashCode());
        Object $path = this.getPath();
        result = result * 59 + ($path == null ? 43 : $path.hashCode());
        Object $component = this.getComponent();
        result = result * 59 + ($component == null ? 43 : $component.hashCode());
        Object $isEnable = this.getIsEnable();
        result = result * 59 + ($isEnable == null ? 43 : $isEnable.hashCode());
        Object $sortValue = this.getSortValue();
        result = result * 59 + ($sortValue == null ? 43 : $sortValue.hashCode());
        Object $icon = this.getIcon();
        result = result * 59 + ($icon == null ? 43 : $icon.hashCode());
        Object $group = this.getGroup();
        result = result * 59 + ($group == null ? 43 : $group.hashCode());
        Object $parentId = this.getParentId();
        result = result * 59 + ($parentId == null ? 43 : $parentId.hashCode());
        return result;
    }

    public static class MenuBuilder {
        private Long id;
        private Long createUser;
        private LocalDateTime createTime;
        private Long updateUser;
        private LocalDateTime updateTime;
        private String name;
        private String describe;
        private Boolean isPublic;
        private String path;
        private String component;
        private Boolean isEnable;
        private Integer sortValue;
        private String icon;
        private String group;
        private Long parentId;

        MenuBuilder() {
        }

        public Menu.MenuBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public Menu.MenuBuilder createUser(final Long createUser) {
            this.createUser = createUser;
            return this;
        }

        public Menu.MenuBuilder createTime(final LocalDateTime createTime) {
            this.createTime = createTime;
            return this;
        }

        public Menu.MenuBuilder updateUser(final Long updateUser) {
            this.updateUser = updateUser;
            return this;
        }

        public Menu.MenuBuilder updateTime(final LocalDateTime updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public Menu.MenuBuilder name(final String name) {
            this.name = name;
            return this;
        }

        public Menu.MenuBuilder describe(final String describe) {
            this.describe = describe;
            return this;
        }

        public Menu.MenuBuilder isPublic(final Boolean isPublic) {
            this.isPublic = isPublic;
            return this;
        }

        public Menu.MenuBuilder path(final String path) {
            this.path = path;
            return this;
        }

        public Menu.MenuBuilder component(final String component) {
            this.component = component;
            return this;
        }

        public Menu.MenuBuilder isEnable(final Boolean isEnable) {
            this.isEnable = isEnable;
            return this;
        }

        public Menu.MenuBuilder sortValue(final Integer sortValue) {
            this.sortValue = sortValue;
            return this;
        }

        public Menu.MenuBuilder icon(final String icon) {
            this.icon = icon;
            return this;
        }

        public Menu.MenuBuilder group(final String group) {
            this.group = group;
            return this;
        }

        public Menu.MenuBuilder parentId(final Long parentId) {
            this.parentId = parentId;
            return this;
        }

        public Menu build() {
            return new Menu(this.id, this.createUser, this.createTime, this.updateUser, this.updateTime, this.name, this.describe, this.isPublic, this.path, this.component, this.isEnable, this.sortValue, this.icon, this.group, this.parentId);
        }

        public String toString() {
            return "Menu.MenuBuilder(id=" + this.id + ", createUser=" + this.createUser + ", createTime=" + this.createTime + ", updateUser=" + this.updateUser + ", updateTime=" + this.updateTime + ", name=" + this.name + ", describe=" + this.describe + ", isPublic=" + this.isPublic + ", path=" + this.path + ", component=" + this.component + ", isEnable=" + this.isEnable + ", sortValue=" + this.sortValue + ", icon=" + this.icon + ", group=" + this.group + ", parentId=" + this.parentId + ")";
        }
    }
}
